import Vue from 'vue'
import Router from 'vue-router'
/* 注意：这里的@指的是src目录，@/等价于../相对路径查找文件 */
import HelloWorld from '@/components/HelloWorld'
import Home from '@/pages/home/Home.vue'/**引入首页组件 */
import List from '@/pages/list/List.vue'/**引入列表页组件 */
import Download from '@/pages/download/Download'/**引入下载页组件 */
import Mine from '@/pages/mine/Mine.vue'/**引入我的页面组件 */
import Search from '@/pages/search/Search.vue'/**引入搜索页组件 */

Vue.use(Router)

export default new Router({
    routes: [
        /*{
            path: '/',
            name: 'HelloWorld',
            component: HelloWorld
        },*/
        {
            path:'/',/**默认进入路由，写在第一个 */
            redirect: '/home'/**重定向 */
        },{
            path: '/home',
            name: 'Home',
            component: Home
        },{
            path:'/list',
            name:'List',
            component:List
        },{
            path:'/download',
            name:'Download',
            component:Download
        },{
            path:'/mine',
            name:'Mine',
            component:Mine
        },{
            path:'/search',
            name:'Search',
            component:Search
        },{
            path:'/*',/**404错误页面，写到最后 */
            redirect: '/home'/**一般会重定向到首页或者404页面 */
        }
    ]
})


